package com.qdxwx.models.company;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author ZhiYong
 * @dateTime 2020/6/1 13:57
 * @description 多机构信息
 */
public class Company implements Serializable {

    private static final long serialVersionUID = 683349484723668293L;
    //机构Id
    private int companyId;
    //上级id
    private int parentId;
    //机构名称
    private String companyName;
    //网站名称
    private String siteName;
    //domain
    private String siteDomain;
    //使用模板名称
    private String siteSkin;
    //使用样式（css）
    private String siteStyle;
    //logo
    private String logo;
    //ico
    private String ico;
    //关键字
    private String keywords;
    //网站介绍
    private String description;
    //版权声明
    private String copyright;
    //联系我们
    private String contact;
    //二维码
    private String qrcode;
    //备注
    private String remarks;
    //禁用（仅内部操作）
    private Integer isDisabled;
    //联系人(仅内部查看)
    private String linkName;
    //联系手机(仅内部查看)
    private String linkMobile;
    //过期日期（仅内部操作）
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate expireDate;
    //最后更新人
    private String updateBy;

    //最后更新时间
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    public int getCompanyId() {
        return companyId;
    }

    public void setCompanyId(int companyId) {
        this.companyId = companyId;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getLinkName() {
        return linkName;
    }

    public void setLinkName(String linkName) {
        this.linkName = linkName;
    }

    public String getLinkMobile() {
        return linkMobile;
    }

    public void setLinkMobile(String linkMobile) {
        this.linkMobile = linkMobile;
    }

    public String getSiteName() {
        return siteName;
    }

    public void setSiteName(String siteName) {
        this.siteName = siteName;
    }

    public String getSiteDomain() {
        return siteDomain;
    }

    public void setSiteDomain(String siteDomain) {
        this.siteDomain = siteDomain;
    }

    public String getSiteSkin() {
        if (siteSkin == null) {
            return "default";
        }
        return siteSkin;
    }

    public void setSiteSkin(String siteSkin) {
        this.siteSkin = siteSkin;
    }

    public String getSiteStyle() {
        if (siteStyle == null) {
            return "default";
        }
        return siteStyle;
    }

    public void setSiteStyle(String siteStyle) {
        this.siteStyle = siteStyle;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getIco() {
        return ico;
    }

    public void setIco(String ico) {
        this.ico = ico;
    }

    public String getKeywords() {
        return keywords;
    }

    public void setKeywords(String keywords) {
        this.keywords = keywords;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getCopyright() {
        return copyright;
    }

    public void setCopyright(String copyright) {
        this.copyright = copyright;
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    public String getQrcode() {
        return qrcode;
    }

    public void setQrcode(String qrcode) {
        this.qrcode = qrcode;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Integer getIsDisabled() {
        return isDisabled;
    }

    public void setIsDisabled(Integer isDisabled) {
        this.isDisabled = isDisabled;
    }

    public LocalDate getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(LocalDate expireDate) {
        this.expireDate = expireDate;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "Company{" +
                "companyId=" + companyId +
                ", companyName='" + companyName + '\'' +
                ", siteName='" + siteName + '\'' +
                ", siteDomain='" + siteDomain + '\'' +
                ", siteSkin='" + siteSkin + '\'' +
                ", siteStyle='" + siteStyle + '\'' +
                ", logo='" + logo + '\'' +
                ", ico='" + ico + '\'' +
                ", keywords='" + keywords + '\'' +
                ", description='" + description + '\'' +
                ", copyright='" + copyright + '\'' +
                ", contact='" + contact + '\'' +
                ", qrcode='" + qrcode + '\'' +
                ", remarks='" + remarks + '\'' +
                ", isDisabled=" + isDisabled +
                ", linkName='" + linkName + '\'' +
                ", linkMobile='" + linkMobile + '\'' +
                ", expireDate=" + expireDate +
                ", updateBy='" + updateBy + '\'' +
                ", updateTime=" + updateTime +
                ", createTime=" + createTime +
                '}';
    }
}
